<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改个人信息</title>
    <style>
        body{
            background-image: url("images/绿色背景.jpg");
        }
    </style>
</head>
<body>
<script type="text/javascript">
    function getQueryVariable(variable)
    {
        var query = window.location.search.substring(1);
        var vars = query.split("&");
        for (var i=0;i<vars.length;i++) {
            var pair = vars[i].split("=");
            if(pair[0] == variable){return pair[1];}
        }
        return(false);
    }

    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return decodeURI(r[2]); return null;
    }

    const memberid = getQueryVariable("memberid");
    const password = getQueryVariable("password");
    const teamid = getQueryVariable("teamid");
    //涉及字符串就用这个方法取参数，否则会乱码
    const name = getQueryString("name");
    const sex = getQueryString("sex");
    const tel = getQueryVariable("tel");


</script>

<form style="
margin-left:auto;
margin-right:auto;
max-width: 500px;
background: #F8F8F8;
padding: 30px 30px 20px 30px;
font: 12px Arial, Helvetica, sans-serif;
color: #666;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;" action="member/set" method="post">
    <h2 style="color: #57AA2C">个人信息修改模块</h2>
    <hr><br>
    <script type="text/javascript">

        document.write('<input style="display: block;margin: 0px 0px 5px;" type="hidden" name="memberid" required="required" value="'+memberid+'" />');

        document.write('密码：<input style="display: block;margin: 0px 0px 5px;" type="password" name="password" required="required" value="'+password+'" />');

        document.write('<input style="display: block;margin: 0px 0px 5px;" type="hidden" name="teamid" required="required" value="'+teamid+'" />');
        document.write('姓名：<input style="display: block;margin: 0px 0px 5px;" type="text" name="name" required="required" value="'+name+'" />');
        document.write('联系方式：<input style="display: block;margin: 0px 0px 5px;" type="text" name="tel" required="required" value="'+tel+'" />');
        document.write('性别：<input style="display: block;margin: 0px 0px 5px;" type="text" disabled="disabled" required="required" value="'+sex+'" />');

        document.write('打算修改为：<select name="sex" value="'+sex+'" >');
    </script>
    <option>男</option>
    <option>女</option>
    <option>Lesbian</option>
    <option>Gay</option>
    <option>Bisexual</option>
    <option>Transgender</option>
    <option>Queer</option>
    <option>InterSex</option>
    <option>Asexual</option>
    <option>Other</option>
    </select>
    <br /><br />
    <input style="
    background-color: #9DC45F;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-border-radius: 5px;
border: none;
padding: 10px 25px 10px 25px;
color: #FFF;
text-shadow: 1px 1px 1px #949494;" type="submit" value="立即修改"/>

</form>


<form style="
margin-left:auto;
margin-right:auto;
max-width: 500px;
background: #F8F8F8;
padding: 30px 30px 20px 30px;
font: 12px Arial, Helvetica, sans-serif;
color: #666;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;" action="../member/login" method="post">
    <script type="text/javascript">
        document.write('<input type="hidden" name="memberid" value="'+memberid+'" />');
        document.write('<input type="hidden" name="password" value="'+password+'" />');
    </script>
    <input type="submit" value="回到个人空间" />
</form>

</body>
</html>